﻿using Lidgren.Network;
using System;

namespace BattleFury.Lib.Network.Packets
{
    public static class PacketTools
    {
        public static IPacket ReadPacket(NetIncomingMessage msg)
        {
            PacketCommand command = (PacketCommand)msg.ReadInt32();
            switch (command)
            {
                case PacketCommand.Move:
                    return new MovePacket(msg);
                default:
                    throw new NotImplementedException();
            }
        }
    }
}
